package cn.org.timespace.ons.service.base.impl;

import java.util.List;

import cn.org.timespace.easyframe.model.permission.EfUser;
import cn.org.timespace.ons.action.base.UserMachineTypeModel;
import cn.org.timespace.ons.dao.base.UserMachineTypeDao;
import cn.org.timespace.ons.service.base.UserMachineTypeService;
import cn.org.timespace.ons.util.pager.Pager;
import cn.org.timespace.ons.vo.base.Options;
import cn.org.timespace.ons.vo.base.UserMachineType;

public class UserMachineTypeServiceImpl implements UserMachineTypeService {

	private UserMachineTypeDao userMachineTypeDao;
	
	
	public UserMachineTypeDao getUserMachineTypeDao() {
		return userMachineTypeDao;
	}

	public void setUserMachineTypeDao(UserMachineTypeDao userMachineTypeDao) {
		this.userMachineTypeDao = userMachineTypeDao;
	}

	@Override
	public void delete(UserMachineType persistentInstance) {
		// TODO Auto-generated method stub
		this.userMachineTypeDao.delete(persistentInstance);
		
	}

	@Override
	public List<Options> findByCode(String code) {
		// TODO Auto-generated method stub
		return this.userMachineTypeDao.findByCode(code);
	}

	@Override
	public List<Object> findByCondition(UserMachineTypeModel model, Pager p) {
		// TODO Auto-generated method stub
		return this.userMachineTypeDao.findByCondition(model, p);
	}

	@Override
	public UserMachineType findById(String id) {
		// TODO Auto-generated method stub
		return this.userMachineTypeDao.findById(id);
	}

	@Override
	public void save(UserMachineType transientInstance) {
		// TODO Auto-generated method stub
		this.userMachineTypeDao.save(transientInstance);
	}

	@Override
	public void update(UserMachineType instance) {
		// TODO Auto-generated method stub
		this.userMachineTypeDao.update(instance);
	}

	@Override
	public UserMachineType doCheckOptionsNameIsExist(String userName,String name) {
		
		return this.userMachineTypeDao.doCheckOptionsNameIsExist(userName,name);
	}

	@Override
	public boolean isExistMachineRelation(String id,String userName) {
		// TODO Auto-generated method stub
		return this.userMachineTypeDao.isExistMachineRelation(id, userName);
	}

	@Override
	public List<Object> findAppByCondition(UserMachineTypeModel model, Pager p,String nid) {
		// TODO Auto-generated method stub
		return this.userMachineTypeDao.findAppByCondition(model, p,nid);
	}
	
	public boolean findTypeAuditByCondition(String appId,String macId,String userId){
		return this.userMachineTypeDao.findTypeAuditByCondition(appId, macId, userId);
	}
	public List<UserMachineType> findByUserName(String userName){
		return this.userMachineTypeDao.findByUserName(userName);
	}

	@Override
	public boolean isExistByTypeName(String typeName,String userName) {
		return this.userMachineTypeDao.isExistByTypeName(typeName, userName);
	}
	

}
